package pdai.Test;

public class collectionTest extends Thread {
    String name;

    public static void main(String[] args) throws InterruptedException {

        String s1 = new String("This is a string");
        String s2 = new String("This is a string");
        collectionTest c1=new collectionTest();
        c1.sleep(100,1);
        c1.wait();

        boolean refEqual = (s1 == s2);
        boolean secEqual = (s1.equals(s2));

        System.out.println("s1 == s2: " + refEqual);
        System.out.println("s1.equals(s2): " + secEqual);
    }

}
